import { RootState } from '@/store'

//查询用户信息
export const select_user_info = (state: RootState) => {
  return state.user.user_info
}

// 查询菜单
export const select_menu = (state: RootState) => {
  // return state.user.menu
  // console.log(JSON.parse(localStorage.getItem('menu')!))
  // console.log(state.user.menu)
  return JSON.parse(localStorage.getItem('menu')!)
}

// 查询学生列表
export const select_student_list_data = (state: RootState) => {
  return state.user.student_list_data
}

// 查询加载状态
export const select_user_loading = (state: RootState) => {
  return state.user.loading
}

// 查询学生管理的编辑按钮的显示
export const select_is_show_student_edit = (state: RootState) => {
  return state.user.is_show_student_edit
}

// 查询学生管理中点击编辑该学生的信息
export const select_student_info = (state: RootState) => {
  return state.user.student_info
}

// 查询管理员列表
export const select_admin_list = (state: RootState) => {
  return state.user.admin_list_data
}
